/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.io.File;

/**
 * <p>Project: javase - Dir1
 * <p>Powered by webrx On 2021-12-13 10:22:17
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Dir1 {
    public static void main(String[] args) {
        //建立目录 文件夹  /xxx windows 此目录位置在项目所有的盘的根目录
        //File f = new File("/xxx");
        //File f = new File("c:/xxx");
        //File f = new File("c:\\xxx");

        //在当前项目根目录下，建立xxx目录
        //File f = new File("xxx");
        //boolean ff = f.mkdir();//建立一级目录
        File f = new File("uuu/aaa/bbb/ccc/ddd/");

        boolean ff = f.mkdirs();//建立多级目录
        System.out.println(ff);
        //删除目录
        var d = new File("xxx");
        if (d.exists() && d.isDirectory()) {
            d.delete();//只能删除文件对象，和空目录对象
        }

        //遍历目录


    }
}
